package dataObjects;

/**
 * AbstractFoodingredientsId entity provides the base persistence definition of
 * the FoodingredientsId entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractFoodingredientsId implements java.io.Serializable {

	// Fields

	private String foodName;
	private String ingredientName;

	// Constructors

	/** default constructor */
	public AbstractFoodingredientsId() {
	}

	/** full constructor */
	public AbstractFoodingredientsId(String foodName, String ingredientName) {
		this.foodName = foodName;
		this.ingredientName = ingredientName;
	}

	// Property accessors

	public String getFoodName() {
		return this.foodName;
	}

	public void setFoodName(String foodName) {
		this.foodName = foodName;
	}

	public String getIngredientName() {
		return this.ingredientName;
	}

	public void setIngredientName(String ingredientName) {
		this.ingredientName = ingredientName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractFoodingredientsId))
			return false;
		AbstractFoodingredientsId castOther = (AbstractFoodingredientsId) other;

		return ((this.getFoodName() == castOther.getFoodName()) || (this
				.getFoodName() != null && castOther.getFoodName() != null && this
				.getFoodName().equals(castOther.getFoodName())))
				&& ((this.getIngredientName() == castOther.getIngredientName()) || (this
						.getIngredientName() != null
						&& castOther.getIngredientName() != null && this
						.getIngredientName().equals(
								castOther.getIngredientName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFoodName() == null ? 0 : this.getFoodName().hashCode());
		result = 37
				* result
				+ (getIngredientName() == null ? 0 : this.getIngredientName()
						.hashCode());
		return result;
	}

}